<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class StoreVillageRequest extends BasicRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'area_id'		=> 'bail|required',
            'lat'               => 'bail|required|numeric',
            'lng'               => 'bail|required|numeric'
        ];
    }
    
    public function messages()
	{
		return [
			'area_id.required'  	=> '缺少区参数',
			'lat.required'			=> '缺少经度',
			'lng.required'			=> '缺少维度',
		];
	}
}
